package com.latvia.cookingapp;

import com.latvia.ui.RecipePhasesActivity;

import android.app.ActionBar;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.Toast;

public class ViewRecipeActivity extends Activity implements OnClickListener {
	
	Button cookButton;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_view_recipe);
		
	cookButton = (Button) findViewById(R.id.cookButton);
	
	cookButton.setOnClickListener(this);
	
	ActionBar actionBar = getActionBar();
	actionBar.setTitle("Awsome Hamburger");
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.view_recipe, menu);
		return true;
	}

	// Implementation for both buttons clicks
	@Override
	public void onClick(View v) {
		switch(v.getId()) {
		case R.id.cookButton:
			Intent myIntent = new Intent(ViewRecipeActivity.this, RecipePhasesActivity.class);
			ViewRecipeActivity.this.startActivity(myIntent);
//			Toast.makeText(this, "Let's Cook Button pressed", Toast.LENGTH_LONG).show();
			break;
		}
	}

}
